<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<link rel="stylesheet" type="text/css" href="css/common.css">
	<link rel="stylesheet" type="text/css" href="css/dengluzc.css">
</head>
<body>
	<div class="right">
	    <p class="bbstab">
	        <a href="#" class="now" id="b0">注册</a>
	        <a href="#" id="b1" class="">登录</a>
	    </p>
	    <div class="bbs">
	        <form action="" method="post" name="myform">
	            <table width="100%" border="0" cellspacing="1" cellpadding="3" class="errorbbs" style="display: block;">
	                <tbody>
	                    <tr>
	                        <td height="40" align="right">昵&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;称：</td>
	                        <td width="215" height="43" align="left">
	                            <input name="realname" type="text" id="realname" size="30">
	                            <span class="red"></span></td></tr>
	                        <td width="111" align="right">密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码：</td>
	                        <td width="341" align="left">
	                            <input name="idnum" type="text" id="idnum" size="30">
	                            <span class="red"></span></td>
	                    
	                    <tr>
	                        <td height="40" align="right">确认密码：</td>
	                        <td>
	                            <input name="phonenum" type="text" id="phonenum" size="30"></td></tr>
	                        <td align="right">手&nbsp;&nbsp;机&nbsp;&nbsp;号：</td>
	                        <td>
	                            <input name="email" type="text" id="email" size="30"></td>
	                    
	                    <tr>
	                        <td height="56" align="right">&nbsp;</td>
	                        <td colspan="3">
	                            <input type="submit" name="submit" id="submit" value="确认注册" class="sub" onclick="javascript:return identify();"></td>
	                    </tr>
	                </tbody>
	            </table>
	        </form>

	        <form id="mail_review">
	            <table width="100%" border="0" cellspacing="1" cellpadding="3" class="errorbbs" style="display: none;">
	                <tbody>
	                    <tr>
	                        <td width="118" height="50" align="right">手机号：</td>
	                        <td width="184" height="50" align="left">
	                            <input id="c_realname" type="text" size="30"></td></tr>
	                        <td width="95" align="right">密&nbsp;&nbsp;&nbsp;&nbsp;码：</td>
	                        <td width="382" align="left">
	                            <input id="c_idnum" type="text" size="30"></td>
	                    
	                    <tr>
	                        <td height="54" align="right">&nbsp;</td>
	                        <td colspan="3">
	                            <input type="button" id="c_review" value="登录" class="check"></td>
	                    </tr>
	                </tbody>
	            </table>
	        </form>
	    </div>
	    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="bm" id="review" style="display:none;margin-bottom:60px;">
	        <tbody>
	            <tr>
	                <th width="50%" height="36" scope="col"></th>
	                <th width="50%" scope="col"></th></tr>
	        </tbody>
	    </table>
	</div>
</body>
<script type="text/javascript">
	//切换
	 var oli = document.getElementsByTagName("a");
	 var odiv = document.getElementsByClassName("errorbbs");
	    for(var i=0 ; i<oli.length ; i++){
	         oli[i].index = i;
	         oli[i].onmouseover = function( ){
	         for(var i =0; i < oli.length; i++){
	             oli[i].className = "";
	             odiv[i].style.display = "none";
	             }
	        this.className = "now";
	        odiv[this.index].style.display="block";
	                }
	            }
	//验证
	var realname = document.getElementById("realname");
    var idnum = document.getElementById("idnum");
    var phonenum = document.getElementById("phonenum");
    var message = document.getElementById("message");
    var asktxt = document.getElementById("asktxt");
    var codefield =document.getElementById("codefield");
    var crealname = document.getElementById("c_realname");
    var cidnum = document.getElementById("c_idnum");
   
    realname.onfocus = function(){
   	this.value = ("");
   	this.style.color = "";
   	this.style.border = "";
   }
   realname.onblur = function(){
   	if(this.value ==""){
   		this.value = ("昵称不能为空！");
   		this.style.color = "red";
   		this.style.border = "1px solid red";
   	}
   }
   
   idnum.onfocus = function(){
   	this.value = ("");
   	this.style.color = "";
   	this.style.border = "";
   }
   idnum.onblur = function(){
   	if(this.value ==""){
   		this.value = ("密码不能为空！");
   		this.style.color = "red";
   		this.style.border = "1px solid red";
   	}
   }
   
   phonenum.onfocus = function(){
   	this.value = ("");
   	this.style.color = "";
   	this.style.border = "";
   }
   phonenum.onblur = function(){
   	if(this.value ==""){
   		this.value = ("密码不能为空！");
   		this.style.color = "red";
   		this.style.border = "1px solid red";
   	}
   }
   
   email.onfocus = function(){
   	this.value = ("");
   	this.style.color = "";
   	this.style.border = "";
   }
   email.onblur = function(){
   	if(this.value ==""){
   		this.value = ("手机号不能为空！");
   		this.style.color = "red";
   		this.style.border = "1px solid red";
   	}
   }

   crealname.onfocus = function(){
   	this.value = ("");
   	this.style.color = "";
   	this.style.border = "";
   }
   crealname.onblur = function(){
   	if(this.value ==""){
   		this.value = ("手机号不能为空！");
   		this.style.color = "red";
   		this.style.border = "1px solid red";
   	}
   }
   
   cidnum.onfocus = function(){
   	this.value = ("");
   	this.style.color = "";
   	this.style.border = "";
   }
   cidnum.onblur = function(){
   	if(this.value ==""){
   		this.value = ("密码不能为空！");
   		this.style.color = "red";
   		this.style.border = "1px solid red";
   	}
   }
</script>
</html>